import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import { createPinia } from 'pinia'

import http from './config/http';

const app = createApp(App);

// http请求
let appPrototype = app.config.globalProperties;
appPrototype.$http = http;

// api
import api from './config/api';
appPrototype.$api = api;

// element-plus
import ElementUi from "element-plus";
import "element-plus/dist/index.css"
import "./style/element-variables.scss"
app.use(ElementUi);

// 注册全局组件
import hsUi from './components/index'
app.use(hsUi);

//http响应拦截器

app.use(createPinia());
app.use(router);
app.mount("#app");
